x86: fix guest migration after c/s 20892:d311d1efc25e
authorJan Beulich <jbeulich@novell.com>
Sat, 16 Jul 2011 08:18:21 +0000 (09:18 +0100)
committerJan Beulich <jbeulich@novell.com>
Sat, 16 Jul 2011 08:18:21 +0000 (09:18 +0100)
Guests would not manage to run successfully after being migrated to a
host having sufficiently much more memory than the host they were
originally started on.

Subsequently the plan is to re-enable the changes behavior under the
control of a guest kernel announced feature flag.

Signed-off-by: Jan Beulich <jbeulich@novell.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
xen/arch/x86/mm.c

index 7e4473c822d92de752b0b35106f2470ce2f36920..35c5fc242c3cc585339053a9be55bc9c84c19565 100644 (file)
@@ -4861,7 +4861,7 @@ long arch_memory_op(int op, XEN_GUEST_HANDLE(void) arg)
             .max_mfn = MACH2PHYS_NR_ENTRIES - 1
         };
 
-        if ( !mem_hotplug )
+        if ( !mem_hotplug && current->domain == dom0 )
             mapping.max_mfn = max_page - 1;
         if ( copy_to_guest(arg, &mapping, 1) )
             return -EFAULT;